package com.quan.bookmall.service;

import com.quan.bookmall.dto.OrderDTO;
import com.quan.bookmall.dto.request.OrderQueryRequest;
import com.quan.bookmall.dto.response.StatisticsResponse;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.time.LocalDateTime;

public interface OrderService {
    
    OrderDTO findById(Long id);
    
    Page<OrderDTO> findByUserId(Long userId, Pageable pageable);
    
    Page<OrderDTO> findByUserIdAndConditions(Long userId, OrderQueryRequest queryRequest);
    
    Page<OrderDTO> findByConditions(OrderQueryRequest queryRequest);
    
    OrderDTO createFromCart(Long userId);
    
    StatisticsResponse getBookSalesStatistics(LocalDateTime startTime, LocalDateTime endTime);
    
    StatisticsResponse getUserConsumptionStatistics(LocalDateTime startTime, LocalDateTime endTime);
    
    StatisticsResponse getUserBookStatistics(Long userId, LocalDateTime startTime, LocalDateTime endTime);
} 